Method for performing out-focus using depth information and camera using the same

ABSTRACT

A camera and a method for extracting depth information by the camera having a first lens and a second lens are provided. The method includes photographing, by the first lens, a first image; photographing, by the second lens, a second image of a same scene; down-sampling the first image to a resolution of the second image if the first image is an image having a higher resolution than a resolution of the second image; correcting the down-sampled first image to match the down-sampled first image to the second image; and extracting the depth information from the corrected down-sampled first image and the second image.

PRIORITY

This application is a Continuation Application of U.S. patent application Ser. No. 14/851,829 filed with the U.S. Patent and Trademark Office on Sep. 11, 2015, which is a Continuation Application of U.S. patent application Ser. No. 13/004,363 filed with the U.S. Patent and Trademark Office on Jan. 11, 2011 and issued as U.S. Pat. No. 9,154,684 on Oct. 6, 2015, and claims priority under 35 U.S.C. § 119(a) to Korean Patent Application No. 10-2010-0002617 filed on Jan. 12, 2010, in the Korean Intellectual Property Office, the entire content of each of which is incorporated herein by reference.

BACKGROUND OF THE INVENTION 1. Field of the Invention

“Out-focus” is a photographing technique which highlights a main object concerned by positioning the main object within the depth of field and positioning the background out of the depth of field to make the background blurred. This can be explained by a geometric optical method using a circle of confusion (COC).

The size k of the circle of confusion can be expressed by Equation (1) below, where N denotes an f-number, f denotes a focal length, u denotes a distance from a camera to a focus surface, and u_(d) denotes a background distance.

$\begin{matrix} {k = {\frac{1}{N}\frac{f^{2}}{u - f}\frac{{u_{d} - u}}{u_{d}}}} & (1) \end{matrix}$

In Equation (1), the size k of the circle of confusion differs in accordance with f number and the focal length of a camera even with respect to the same values of u and u_(d). Also, as can be understood from Equation (1), the size k of the circle of confusion is inversely proportional to the f-number, and in proportion to a square of f.

In general, as the ratio of the circle of confusion to the background increases, the out focus effect becomes more pronounced, whereas as the ratio of the circle of confusion to the background decreases, the out-focus effect becomes less pronounced.

A method of implementing the out-focus effect in the related art is performed mainly using a Digital Single-Lens Reflex (DSLR) camera. The DSLR camera is a lens exchange type camera. Since the DSLR camera can make the f-number small and make the focal length long, the size of the circle of confusion and the ratio of the circle of confusion to the background can be increased, and thus the out-focus effect can be well presented.

However, in a Digital Still Camera (DSC) or a phone camera, the focal length is generally short and the f-number is generally large, and it may not be possible to properly present the out-focus effect. In comparison to the DSLR camera, the out-focus effect of a DSC or phone camera may be tens to several hundreds of times lower than that of the DSLR camera.

SUMMARY OF THE INVENTION

According to an aspect of the present invention, a method for performing out-focus of a camera having a first lens and a second lens is provided. The method includes photographing a first image with the first lens and photographing a second image with the second lens of a same scene, extracting depth information of the photographed first image and the photographed second image using the photographed first image and the photographed second image, and performing out-focus on the first image or the second image using the extracted depth information.

According to another aspect of the present invention, a camera is provided. The camera includes a first lens, a second lens, a first image sensor configured to acquire a first image through the first lens, a second image sensor configured to acquire a second image of a same scene through the second lens, an image processor configured to extract depth information of the acquired first image and second image using the acquired first image and second image, and a controller configured to perform out-focus with respect to the first image or the second image using the extracted depth information.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a view illustrating a stereo camera according to an embodiment of the present invention;

FIG. 2 is a block diagram illustrating the configuration of a stereo camera according to an embodiment of the present invention;

FIG. 3 is a flowchart illustrating a method for performing out-focus using depth information according to an embodiment of the present invention;

FIGS. 4A and 4B are two photographs having different resolutions acquired by a first image sensor and a second image sensor according to an embodiment of the present invention;

FIGS. 5A and 5B are two photographs taken by a first lens unit and a second lens unit having optical zoom effects of different magnifications according to an embodiment of the present invention; and

FIGS. 6A to 6E are photographs showing a process of performing an out-focus effect using depth information according to an embodiment of the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE PRESENT INVENTION

Certain embodiments of the present invention will now be described in greater detail with reference to the accompanying drawings.

In the following description, same drawing reference numerals are used for the same elements even in different drawings. While the embodiments are described with detailed construction and elements to assist in a comprehensive understanding of the various applications and advantages of the embodiments, it should be apparent that the embodiments can be carried out without those specifically detailed particulars. Also, well-known functions or constructions will not be described in detail so as to avoid obscuring the description with unnecessary detail. It should be also noted that in the drawings, the dimensions of the features are not intended to be to true scale, and may be exaggerated for the sake of allowing greater understanding.

FIG. 1 is a view illustrating a stereo camera 100 according to an embodiment of the present invention. As illustrated in FIG. 1, a stereo camera 100 according to an embodiment of the present invention may have at least two lenses 110 and 115 and at least two image sensors (not illustrated). A first image and a second image of the same scene may be acquired through two different lenses 110 and 115.

In some embodiments, the two different acquired images may be images having different resolutions or images acquired by optical zoom having different magnifications. For example, the first image may be a high-resolution image having a resolution equal to or higher than 10 megapixels, and the second image may be a low-resolution image having a resolution of about 1, 3, or 5 megapixels. FIGS. 5A and 5B show photographs taken by the first lens unit 110 and the second lens unit 115 having optical zoom effects of different magnifications. FIG. 5A is a photograph taken by the first lens unit, i.e. by a lens having a high-magnification optical zoom function of ×5. FIG. 5B is a photograph taken by the second lens unit, i.e. by a lens having a low-magnification optical zoom function of ×1.

In another example, the first image may be an image acquired by a high magnification optical zoom that is equal to or higher than ×5 optical zoom, and the second image may be an image acquired by a low-magnification optical zoom, such as no optical zoom, ×2 optical zoom, or another magnification less than the first image.

FIGS. 4A and 4B show photographs having different resolutions picked up by the first image sensor 120 and the second image sensor 125. FIG. 4A shows an image picked up by the first image sensor 120 with a resolution of 10 megapixels. FIG. 4B shows an image picked up by the second image sensor 125 with a resolution of 5 megapixels.

The stereo camera 100 may extract depth information of a photographed scene using the two images of the same scene. Using the extracted depth information, the stereo camera 100 may perform out-focus with respect to the first image or the second image. The details of the process of extracting the depth information will be described below with reference to FIG. 3.

FIG. 2 is a block diagram illustrating the configuration of a stereo camera 100 according to an embodiment of the present invention. As illustrated in FIG. 2, the stereo camera 100 may include a first lens unit 110, a second lens unit 115, a first image sensor 120, a second image sensor 125, an image processing unit 130, a display unit 140, a storage unit 150, and/or a control unit 160.

The first lens unit 110 and the second lens unit 115 may gather light from an object and form images on regions of the first image sensor 120 and the second image sensor 125. The first image sensor 120 and the second image sensor 125 may perform photoelectric conversion of light from the first lens unit 110 and the second lens unit 115 into electric signals. An image processing unit 130 may process the first image and the second image input from the first image sensor 120 and the second image sensor 125, respectively, and may transmit an image signal obtained by processing the images to the display unit 140. The image processing unit 130 may also extract depth information from the first image and the second image, and may perform the out-focus using the extracted depth information. The depth information may be incorporated into a depth map that may include depth information of respective pixels of the first image and the second image.

To extract depth information in embodiments of the invention with lenses of different magnification, the image processing unit 130 may crop a region that corresponds to the first image among the whole region of the second image photographed by a low-magnification optical zoom to match the first image to the cropped portion of the second image. Here, the term “crop” means cutting of a predetermined region of an image.

After cropping the second image, in embodiments of the invention with image sensors of different resolution, the image processing unit 130 may perform down sampling to match the first image having a high resolution to the resolution of the second image having a low resolution.

The image processing unit 130 may then correct the first image and the second image to match the first down-sampled image to the second image. Matching of the first image to the second image may involve matching of focuses, exposure conditions, white balances, epipolar lines, and the like, of the first image and the second image. The image processing unit 130 may process the first image and the second image, and may rotate and move the first image and the second image so that the focuses, exposure conditions, white balances, and the like, of the first image and the second image substantially coincide with each other.

After correcting the first image and the second image, the image processing unit 130 may extract the depth map using the matched first image and the second image. A stereo matching method may be used to extract the depth map. A stereo matching method may be a method that calculates a depth value by detecting the locations of corresponding points in different images and determining an amount of movement of the corresponding points in the image. The image processing unit 130 may generate a depth map by gathering the depth values of some or all of the pixels. Then, the image processing unit 130 may perform up-sampling of the extracted depth map and may perform out-focus using the up-sampled depth map.

A method of extracting depth information using the first image and the second image according to an embodiment of the invention will be described in detail with reference to FIG. 3. The display unit 140 may display an image received from the image processing unit 130. A user can confirm the photographed image by confirming the image displayed on the display unit 140. The storage unit 150 may store the images photographed by the first image sensor 120 and the second image sensor 125 in a compressed form. The storage unit 160 may be a nonvolatile memory, a hard disc, or the like. The control unit 160 may receive a user command based on a user's input to a manipulation unit (not illustrated), and may control the operation of the stereo camera 100 in accordance with the user command. The control unit 160 may control the image processing unit 130 to perform an auto focusing, auto exposure, auto white balancing, and the like, of the stereo camera 100. The control unit 160 may also extract depth information using the first image and the second image, and may control the image processing unit 130 so that out focus is performed with respect to the first image and the second image using the extracted depth information.

Hereinafter, with reference to FIGS. 3 and 6A to 6E, the out-focusing method using the depth information according to an embodiment of the invention will be described.

FIG. 3 is a flowchart illustrating a method for performing the out-focus using the depth information according to an embodiment of the present invention. The stereo camera 100 may determine whether the first image and the second image having different resolutions have been photographed through the first image sensor and the second image sensor (S210). If the first image and the second image having different resolutions have been photographed (S210-Y), the stereo camera 100 may determine whether the first image and the second image have been photographed by optical zoom having different magnifications (S220).

If the first image and the second image are photographed by the optical zoom having the same magnification (S220-Y), the stereo camera 100 may perform down-sampling of the first image having high resolution to the resolution level of the second image having low resolution, which may enable extracting the depth map by the stereo matching method (S240). For example, in the case where a high-resolution image of 10 megapixels, FIG. 4A, and a low-resolution image of 5 megapixels, FIG. 4B, are photographed, the stereo camera 100 may perform down-sampling of the high-resolution image to match the resolution of the low-resolution image. Since the resolution of the high-resolution image is twice higher than the resolution of the low-resolution image in this example, the resolution of the high-resolution image may be down-sampled by half.

The stereo camera 100 may match the first image to the second image to extract the depth map using the first down-sampled image and the second image. The stereo camera 100 may correct the first image and the second image to match the first image to the second image (S250). As described above, matching of the first image to the second image may include rotating and moving of the first image or the second image to match the epipolar lines of the first image and the second image in addition to the matching of focuses, exposure conditions, white balances, and the like, of the first image and the second image.

After correcting the first image and the second image to match the first image to the second image, the stereo camera 100 may extract the depth map using the first image and the second image (S260). A stereo matching method may be used to extract the depth map. As noted above, corresponding points in the first and second images may be detected and an amount of movement of the corresponding points may be calculated. If the amount of movement of a point is obtained, the depth map may be extracted based on the obtained amount of movement. FIG. 6C shows an example depth map extracted using the stereo matching method. In the depth map of FIG. 6C, a brighter portion is a portion that is closer to the camera (i.e. a portion having a small depth value), and a darker portion is a portion that is farther from the camera (i.e. a portion having a large depth value).

Once the depth map is extracted, the stereo camera may perform up-sampling of the depth map to a resolution that is substantially equal to the resolution of the high-resolution image (S270). This is to perform the out-focus using the first image having the high resolution. For example, the stereo camera performs twice up-sampling of the depth map of 5 megapixels as shown in FIG. 6C to the resolution of the depth map of 10 megapixels as illustrated in FIG. 6D. This is to make the resolution of the depth map as shown in FIG. 6C coincide with the resolution of the depth map as shown in FIG. 6D. As an example, the depth map of the portion 610 appears dark even though the portion 610 is in a short distance. In this case, an image correction may be performed with respect to the portion 610 where an error has occurred. A joint bilateral filter method may be used to obtain up-sampled depth map information as shown in FIG. 6D, or other error correction methods may be used.

After up-sampling the extracted depth map, the stereo camera 100 may perform blurring of a region of the first image using the up-sampled depth map (S280). Here, the blurred region may be a pixel region for which the depth information is equal to or greater than a reference pixel or pixel region among pixels that include the extracted depth information. A blurring method using a convolution filter or other technique may be used. FIG. 6E shows an image in which the out-focus effect is expressed through performing the blurring of the predetermined region. The first image, including the blurred region, may be output to the display unit 140 (S290).

In an embodiment of the invention, if the magnifications of the first image and the second image are different from each other (S220-N), the stereo camera 100 may crop the image acquired by the low-magnification optical zoom to extract the depth map using the stereo matching method (S230). As shown in FIGS. 5A and 5B, the stereo camera 100 may crop the same region 525 as the image acquired by the high-magnification optical zoom from the image acquired by the low-magnification optical zoom. The first image and the second image therefore may become the images of the same object with different resolutions. An out-focusing process may be performed in the same manner as the steps S240 to S290 as described above.

The first image has the resolution of 10 megapixels and the second image has the resolution of 5 megapixels, in this example for convenience in explanation. Embodiments of the invention may use any images having different resolutions. Also, while a blurring method using a convolution filter is presented, this is an example for convenience in explanation. Any blurring method can be adopted in addition to or in place of the blurring method using a convolution filter.

The foregoing embodiments and advantages are merely exemplary and are not to be construed as limiting the present invention. The present teaching can be readily applied to other types of apparatuses. Also, the description of the embodiments is intended to be illustrative, it will be appreciated by those skilled in the art that many changes, alternatives, modifications, and variations may be made without departing from the principles and spirit of the teachings of the present disclosure, the scope of which is defined in the appended claims and their equivalents. 

What is claimed is:
 1. A method for performing an out-of-focus effect by a camera having a first lens and a second lens, the method comprising: photographing a first image with the first lens and photographing a second image of a same scene with the second lens, a first image resolution of the photographed first image being higher than a second image resolution of the photographed second image; extracting a depth map from the first image and the second image using a stereo matching method; up-sampling the extracted depth map to the first image resolution of the first image; and performing an out-of-focus effect comprising blurring pixel regions of the first image having depths in the depth map that satisfy a predetermined condition using the up-sampled depth map.
 2. The method as claimed in claim 1, wherein the first image has a higher optical magnification than an optical magnification of the second image.
 3. The method as claimed in claim 2, wherein extracting the depth map further comprises: cropping a portion of the second image in order to make an image region acquired in the second image coincide with an image region acquired in the first image; down-sampling the first image to a resolution of the second cropped image; correcting the first down-sampled image to match the second cropped image; and extracting the depth map from the first corrected image and the second cropped image.
 4. The method as claimed in claim 1, wherein the out-of-focus effect is performed using a convolution filter.
 5. The method as claimed in claim 1, wherein the camera is one of a digital still camera and a phone camera.
 6. The method as claimed in claim 1, further comprising setting a reference pixel and the predetermined condition comprises depth that is equal to or greater than a depth of the reference pixel.
 7. A camera comprising: a first lens; a second lens; a first image sensor configured to acquire a first image through the first lens, the first image having a first image resolution; a second image sensor configured to acquire a second image of a same scene through the second lens, the second image having a second image resolution lower than the first image resolution; an image processor configured to extract a depth map based on the acquired first image and the acquired second image using a stereo matching method and up-sample the extracted depth map to the first image resolution of the first image; and a controller configured to perform an out-of-focus effect comprising blurring pixel regions of the first image having depth in the depth map that satisfy a predetermined condition using the up-sampled depth map.
 8. The camera as claimed in claim 7, wherein the first image has a higher magnification than an optical magnification of the second image.
 9. The camera as claimed in claim 8, wherein the image processor is further configured to crop a portion of the second image in order to make an image region acquired in the second image coincide with an image region acquired in the first image, perform down-sampling of the first image to a resolution of the second cropped image, correct the first down-sampled image to match the second cropped image, and extract the depth map from the first corrected image and the second cropped image.
 10. The camera as claimed in claim 7, wherein the camera is configured to perform the out-of-focus effect using a convolution filter. 